<!DOCTYPE HTML>
<html>
<?php session_start();?>
	<head>
		<meta charset="utf-8">
		<title>订单后台</title>
	</head>
	<body>
		<center>
		<?PHP
			date_default_timezone_set("PRC");

			include("../../public/config.php");
			$link = mysqli_connect(HOST,USER,PASS,DBNAME) or die("数据连接失败！");
			mysqli_set_charset($link,"utf8");
			switch ($_GET['a']) {							//根据a的传值进行对应的操作

				case 'del':
					$id = $_GET['id'];
					$sql = "delete  from comment where id={$id}";
					mysqli_query($link,$sql);
					if (mysqli_affected_rows($link)) {
						echo '<script>alert("删除成功！"); </script>';
						header("refresh:0;url=mypingjia.php");
					}else{
						echo '<script>alert("删除失败！"); </script>';
						header("refresh:0;url=mypingjia.php");
					}
					break;
			}
		?>
		</center>
	</body>
</html>